package com.example.lago_di_sangue;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;

public class MainActivity extends Activity {

	private static final String TAG = MainActivity.class.getSimpleName();

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

	public void goToNextActivity(View view) {
		Log.d(TAG, "Go to next activity");

		Class nextActivity = null;
		
		switch (view.getId()) {
		case R.id.button1:
			nextActivity = IntroActivity.class;
			break;
		case R.id.button2:
			nextActivity = GameActivity.class;
			break;
		default:
			break;
		}
		
		Intent goToNextActivity = new Intent(getApplicationContext(),
				nextActivity);
		startActivity(goToNextActivity);

	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {

		switch (event.getAction()) {
		case MotionEvent.ACTION_DOWN:
			Log.d(TAG, "touch the screen");
			break;
		case MotionEvent.ACTION_UP:
			Log.d(TAG, "release the screen");
			break;
		case MotionEvent.ACTION_MOVE:
			Log.d(TAG, "move on the screen");
			break;
		default:
			break;
		}

		return super.onTouchEvent(event);
	}
}
